import React, { Component } from 'react';
import { Route, Switch } from 'react-router-dom';

import Layout from '../views/Layout';
import Login from '../views/Login';
import Register from '../views/Register';
import Home from '@/views/Pages/Home';
import User from '@/views/Pages/User';
import Menu from '@/views/Pages/Menu';
import Dict from '@/views/Pages/Dict';
import Role from '@/views/Pages/Role';
import Office from '@/views/Pages/Office';
import OfficeForPlatform from '@/views/Pages/Office';
import UserForPlatform from '@/views/Pages/User';
import AgentType from '@/views/Pages/AgentType';
import Area from '@/views/Pages/Area';
import Binding from '@/views/Pages/Binding';
import Panel from '@/views/Pages/Panel';
import Password from '@/views/Pages/Password';
import Resetmailbox from '@/views/Pages/Resetmailbox';
import CommunityManage from '@/views/Pages/CommunityManage';
import CommunityProperty from '@/views/Pages/CommunityProperty';
import CommunityPlatform from '@/views/Pages/CommunityPlatform';
import CommunityAgent from '@/views/Pages/CommunityAgent';
import HouseCost from '@/views/Pages/CommunityHouseCost';
import HouseUser from '@/views/Pages/CommunityHouseUser';
import Distributor from '@/views/Pages/Distributor';
import Agent from '@/views/Pages/Agent';
import AdSaleManage from '@/views/Pages/AdSaleManage';
import Property from '@/views/Pages/Property';
import CommunityNotice from '@/views/Pages/CommunityNotice';
import AdvRelease from '@/views/Pages/AdvRelease';
import Hardinfo from '@/views/Pages/Hardinfo';
import Acoustic from '@/views/Pages/HardAcoustic';
import Gate from '@/views/Pages/HardGate';
import HardDeviceorder from '@/views/Pages/HardDeviceorder';
import AdvOutRelease from '@/views/Pages/AdvOutRelease';
import AdvSaleOrder from '@/views/Pages/AdvSaleOrder';
import AdvFamilyLockRelease from '@/views/Pages/AdvFamilyLockRelease';
import AdvPhoneRelease from '@/views/Pages/AdvPhoneRelease';
import userWithdraw from '@/views/Pages/UserWithdraw';
import agentWithdraw from '@/views/Pages/AgentWithdraw';
import wallet from '@/views/Pages/Wallet';
import withdrawManage from '@/views/Pages/WithdrawManage';
import BalancelogAdvertising from '@/views/Pages/BalancelogAdvertising';
import BalancelogSonicDetail from '@/views/Pages/BalancelogSonicDetail';
import BalancelogScreensaver from '@/views/Pages/BalancelogScreensaver';
import AdvExam from '@/views/Pages/AdvExam';
import PlatformBalancelog from '@/views/Pages/PlatformBalancelog';
import Hardonline from '@/views/Pages/Hardonline';
import AdvPhoneType from '@/views/Pages/AdvPhoneType';
import PlatAdvFamilyLockRelease from '@/views/Pages/PlatAdvFamilyLockRelease';
import PlatAdvPhoneRelease from '@/views/Pages/PlatAdvPhoneRelease';
import PlatAdvPhoneTypeRelease from '@/views/Pages/PlatAdvPhoneTypeRelease';
import PlatAdvRelease from '@/views/Pages/PlatAdvRelease';
import Face from '@/views/Pages/Face';
import AcousticAget from '@/views/Pages/AcousticAget';
import CommunityGateAgent from '@/views/Pages/CommunityGateAgent';
import AcousticOnline from '@/views/Pages/AcousticOnline';
import MakerAdvFamilyLock from '@/views/Pages/MakerAdvFamilyLock';
import MakerAdvRelease from '@/views/Pages/MakerAdvRelease';
import MakerAdvPhone from '@/views/Pages/MakerAdvPhone';
import MakerAdvPhoneType from '@/views/Pages/MakerAdvPhoneType';
import MakerUser from '@/views/Pages/MakerUser'; 
import PlatCommHouseCost from '@/views/Pages/PlatCommHouseCost'; 
import MakerAdvOutOrder from '@/views/Pages/MakerAdvOutOrder';
import PlatformHardinfo from '@/views/Pages/PlatformHardinfo';
import PlatformAcoustic from '@/views/Pages/PlatformHardAcoustic';
import PlatformGate from '@/views/Pages/PlatformHardGate';
import PlatformHardDeviceorder from '@/views/Pages/PlatformHardDeviceorder';
import PlatformHardonline from '@/views/Pages/PlatformHardonline';
import PlatAdvOutOrder from '@/views/Pages/PlatAdvOutOrder';
import PlatDeviceRegister from '@/views/Pages/PlatDeviceRegister';
export const childRoutes = [
  {
    'path':'/home',
    'component': Home,
    'exactly': true
  },
  {
    'path':'/user',
    'component': User,
  },
  {
    'path':'/dict',
    'component': Dict
  },
  {
    'path':'/menu',
    'component': Menu
  },
  {
    'path':'/office',
    'component': Office
  },
  {
    'path':'/office_for_platform',
    'component': OfficeForPlatform
  },
  {
    'path':'/user_for_platform',
    'component': UserForPlatform
  },
  {
    'path':'/distributor',
    'component': Distributor
  },
  {
    'path':'/agent',
    'component': Agent
  },
  {
    'path':'/property',
    'component': Property
  },
  {
    'path':'/agent_type',
    'component': AgentType
  },
  {
    'path':'/role',
    'component': Role
  },
  {
    'path':'/area',
    'component': Area
  },
  {
    'path':'/password',
    'component': Password
  },{
    'path':'/manage/panel',
    'component': Panel
  },
  {
    'path':'/bindEmail',
    'component': Binding
  },
  {
    'path':'/resetmailbox',
    'component': Resetmailbox
  },
  {
    'path':'/community/manage',
    'component': CommunityManage
  },
  {
    'path':'/community/communityProperty',
    'component': CommunityProperty
  },
  {
    'path':'/community/communityPlatform',
    'component': CommunityPlatform
  },
  {
    'path':'/community/communityAgent',
    'component': CommunityAgent
  },
  {
    'path':'/community/houseCost',
    'component': HouseCost
  },
  {
    'path':'/community/houseUser',
    'component': HouseUser
  },
  {  'path':'/cnotice',
    'component': CommunityNotice
  },
  {  'path':'/hardinfo',
    'component': Hardinfo
  },
  {  'path':'/acoustic',
    'component': Acoustic
  },
  {  'path':'/gate',
    'component': Gate
  },
  {
    'path':'/ad/saleManage',
    'component': AdSaleManage
  },
{
    'path':'/adv/release',
    'component': AdvRelease
 }, {
    'path':'/hardDeviceOrder',
    'component': HardDeviceorder
  }, {
    'path':'/adv/outRelease',
    'component': AdvOutRelease
  }, {
    'path':'/adv/saleOrder',
    'component': AdvSaleOrder
  }, {
    'path':'/adv/familyLock',
    'component': AdvFamilyLockRelease
  },
  {
    'path':'/adv/platformbalanceLog',
    'component': BalancelogAdvertising
  }, {
    'path':'/adv/sonicdetail',
    'component': BalancelogSonicDetail
  }, {
    'path':'/adv/handsetscreensaver',
    'component': BalancelogScreensaver
  },{
    'path':'/adv/advexam',
    'component': AdvExam
  },{

    'path':'/adv/phoneRelease',
    'component': AdvPhoneRelease
  }, {
    'path':'/userWithdraw',
    'component': userWithdraw
  }, {
    'path':'/agentWithdraw',
    'component': agentWithdraw
  }, {
    'path':'/wallet',
    'component': wallet
  }, {
    'path':'/manage/withdraw',
    'component': withdrawManage
  },{
    'path':'/platformbalancelog',
    'component': PlatformBalancelog
  },
  {
    'path':'/acousticOnline',
    'component': Hardonline
  },
  {
    'path':'/adv/phoneType',
    'component': AdvPhoneType
  },
  {
    'path':'/adv/platAdvFamilyLockRelease',
    'component': PlatAdvFamilyLockRelease
  },
  {
    'path':'/adv/platPhoneRelease',
    'component': PlatAdvPhoneRelease
  },
  {
    'path':'/adv/platPhoneTypeRelease',
    'component': PlatAdvPhoneTypeRelease
  },
  {
    'path':'/adv/platAdvRelease',
    'component': PlatAdvRelease
  },
  {
    'path':'/hard/face',
    'component': Face
  },
  {
    'path':'/hard/acsouticagent',
    'component': AcousticAget
  },
  {
    'path':'/hard/communitygateAgent',
    'component': CommunityGateAgent
  },
  {
    'path':'/hard/offlineagent',
    'component': AcousticOnline
  },
  {
    'path':'/maker/advFamilyLock',
    'component': MakerAdvFamilyLock
  },
  {
    'path':'/maker/advRelease',
    'component': MakerAdvRelease
  },
  {
    'path':'/maker/advPhone',
    'component': MakerAdvPhone
  },
  {
    'path':'/maker/advPhoneType',
    'component': MakerAdvPhoneType
  },
  {
    'path':'/maker/user',
    'component': MakerUser
  },
  {
    'path':'/plat/houseCost',
    'component': PlatCommHouseCost
  },
  {
    'path':'/maker/advOutOrder',
    'component': MakerAdvOutOrder 
  },
  {
    'path':'/platform/hardinfo',
    'component': PlatformHardinfo
  },
  {
    'path':'/platform/acoustic',
    'component': PlatformAcoustic
  },
  {
    'path':'/platform/gate',
    'component': PlatformGate
  },
  {
    'path':'/platform/deviceorder',
    'component': PlatformHardDeviceorder
  },
  {
    'path':'/platform/online',
    'component': PlatformHardonline
  },
  {
    'path':'/adv/platOutOrder',
    'component': PlatAdvOutOrder
  },
  {
    'path':'/plat/deviceRegister',
    'component': PlatDeviceRegister
  },
 /* {
    'path':'/platformdata',
    'component': PlatformData
  },*/
];

const routes = (
  <Switch>
    <Route path="/login" component={Login}/>
    <Route path="/register" component={Register}/>
    <Route path="/" component={Layout}/>
  </Switch>
);

export default routes
